// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import '@/icons'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import store from "./store/"
import axios from 'axios'  
// import "./permission";
import VeBar from 'v-charts/lib/bar.common'
import '@/styles/index.scss' // global css
// axios.defaults.withCredentials =true;
Vue.prototype.$http=axios;
// Vue.prototype.baseURL = process.env.API_ROOT;

Vue.use(ElementUI)
Vue.component(VeBar.name, VeBar)
Vue.config.productionTip = false
// axios.interceptors.request.use(config => {    //配置axios请求头，axios每次发起请求携带token，在Network中的headers看的到
//   // console.log(config)
//   config.headers.token = sessionStorage.getItem('hasToken')  //Authorization  是请求头要求加上的字段
//   return config
// })
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App),
  template: '<App/>'
})
